package lab02.test06;

public class TestTriangle {
  float a,b,c;
  TestTriangle(){
      this.a = 0;
      this.b = 0;
      this.c = 0;
  }
    TestTriangle(float a,float b,float c){
        this.a = a;
        this.b = b;
        this.c = c;
    }
    void set_c(float c){
        this.c = c;
    }
    boolean judgment(){
        if (a+b>c&&a+c>b&&b+c>a)
            return true;
        return false;
    }
    float perimerter(){
        return a+b+c;

    }
    float area(){
        float s;
        float m;
        m = (a+b+c)/2;
        s = (float)Math.sqrt(m*(m-a)*(m-b)*(m-c));
        return s;
    }
    void display(){
        System.out.println("三角形的三条边：" + a + b + c);
    }
}
